package com.example.demo.Service;

import com.example.demo.DAO.DemoMapper;
import com.example.demo.POJO.Demo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by liupeng on 2017/12/18.
 */
@Service
public class DemoService {
    @Resource
    private DemoMapper demoMapper;

    @Transactional
    public int save(Demo demo)
    {
        demoMapper.save(demo.getUsername(),demo.getPassword());
        return 0;
    }
}
